package cn.stylefeng.guns.dao.mapper;

import cn.stylefeng.guns.dao.entity.ReportDto;
import cn.stylefeng.guns.dao.entity.SaleStock;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;
import java.util.Objects;

/**
 * <p>
 * Mapper 接口
 * </p>
 *
 * @author quspacedraon
 * @since 2024-01-13
 */
public interface SaleStockMapper extends BaseMapper<SaleStock> {

    List<ReportDto> sumPrice(@Param("startTime") Long startTime, @Param("endTime") Long endTime, @Param("supplierId") String supplierId, @Param("goodsId") String goodsId, @Param("saleStockIdList") List<String> saleStockIdList);

    List<Map<String, Object>> sumTotalPrice(@Param("startTime") Long startTime, @Param("endTime") Long endTime, @Param("supplierIdList") List<String> supplierIdList);

    void updateStatusByIdList(@Param("auditStatus") Integer auditStatus, @Param("auditLogId") String auditLogId, @Param("saleIdList") List<String> saleIdList);
}
